
#include <string>
#include <vector>
#include <iostream>
using namespace std;
const char c_null = '\0';
const string null("nil");
const char c_backspace = '\b';
const string backspace("bck");
const char c_esc = '\033';
const string esc("esc");
const char c_enter = '\r';
const string enter("ent");
const char c_blank = ' ';
const string blank("blk");
const char c_tab = '\t';
const string tab("tab");
const char c_quote = '\"';
const string quote("qut");
const char c_single_quotation = '\'';
const string single_quotation("sqt");

struct chars
{
    char c1, c2, c3, c4, c5, c6, c7, c8;
    chars()
    {
        c1 = '\0';
        c2 = '\0';
        c3 = '\0';
        c4 = '\0';
        c5 = '\0';
        c6 = '\0';
        c7 = '\0';
        c8 = '\0';
    }
};

char to_char(const string& s)
{
    if(s == null) return c_null;
    else if(s == blank) return c_blank;
    else if(s == tab) return c_tab;
    else if(s == enter) return c_enter;
    else if(s == backspace) return c_backspace;
    else if(s == esc) return c_esc;
    else if(s == quote) return c_quote;
    else if(s == single_quotation) return c_single_quotation;
    else return s[0];
}

string output(char c)
{
    if(c == c_null) return null;
    else if(c == c_blank) return blank;
    else if(c == c_tab) return tab;
    else if(c == c_enter) return enter;
    else if(c == c_backspace) return backspace;
    else if(c == c_quote) return quote;
    else if(c == c_single_quotation) return single_quotation;
    else if(c == c_esc) return esc;
    else return string("\"") + c + "\"c";
}

int main()
{
    vector<chars> s;
    int kc;
    string c1, c2, c3, c4, c5, c6, c7, c8;
    while(cin >> kc >> c1 >> c2 >> c3 >> c4 >> c5 >> c6 >> c7 >> c8)
    {
        if(kc >= 0)
        {
            while(kc >= s.size()) s.push_back(chars());
            chars& c = s[kc];
            c.c1 = to_char(c1);
            c.c2 = to_char(c2);
            c.c3 = to_char(c3);
            c.c4 = to_char(c4);
            c.c5 = to_char(c5);
            c.c6 = to_char(c6);
            c.c7 = to_char(c7);
            c.c8 = to_char(c8);
        }
    }

    cout << endl
         << "'this file is generated by" << endl
         << "'    osi/root/codegen/console_key_info_mapping/console_key_info_mapping.exe with" << endl
         << "'    osi/root/codegen/console_key_info_mapping/console_key_info_mapping.txt" << endl
         << "'so change osi/root/codegen/console_key_info_mapping/console_key_info_mapping.cpp instead" << endl
         << "Public Module _console_key_info_mapping" << endl
         << "    Private Const " << null << " As Char = character.null" << endl
         << "    Private Const " << tab << " As Char = character.tab" << endl
         << "    Private Const " << blank << " As Char = character.blank" << endl
         << "    Private Const " << quote << " As Char = character.quote" << endl
         << "    Private Const " << single_quotation << " As Char = character.single_quotation" << endl
         << "    Private Const " << enter << " As Char = character.enter" <<endl
         << "    Private Const " << backspace << " As Char = character.backspace" << endl
         << "    Private Const " << esc << " As Char = character.esc" << endl
         << "    Public ReadOnly console_key_info_mapping(,) As Char = {" << endl;
    for(int i = 0; i < s.size(); i++)
    {
        cout << "        {" << output(s[i].c1) << ", "
                            << output(s[i].c2) << ", "
                            << output(s[i].c3) << ", "
                            << output(s[i].c4) << ", "
                            << output(s[i].c5) << ", "
                            << output(s[i].c6) << ", "
                            << output(s[i].c7) << ", "
                            << output(s[i].c8) << "}";
        if(i < s.size() - 1) cout << ",";
        else cout << "}";
        cout << endl;
    }
    cout << "End Module" << endl;
}

